# Generated by Django 4.0.7 on 2022-10-11 16:13

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("check", "0022_delete_logselasticstacksettings"),
    ]

    operations = [
        migrations.CreateModel(
            name="DescNameFormat",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "standard",
                    models.CharField(
                        max_length=255,
                        unique=True,
                        verbose_name="Необходимое имя оборудования",
                    ),
                ),
                (
                    "replacement",
                    models.TextField(verbose_name="Возможные варианты (через запятую)"),
                ),
            ],
            options={
                "verbose_name": "VLAN traceroute desc name format",
                "db_table": "vlan_traceroute_desc_name_format",
            },
        ),
        migrations.CreateModel(
            name="DevicesInfo",
            fields=[
                (
                    "ip",
                    models.CharField(max_length=15, primary_key=True, serialize=False),
                ),
                ("interfaces", models.TextField(null=True)),
                ("interfaces_date", models.DateTimeField(null=True)),
                ("sys_info", models.TextField(null=True)),
                ("sys_info_date", models.DateTimeField(null=True)),
                ("vlans", models.TextField(null=True)),
                ("vlans_date", models.DateTimeField(null=True)),
                (
                    "device_name",
                    models.CharField(max_length=100, null=True, unique=True),
                ),
            ],
            options={
                "db_table": "device_info",
                "ordering": ("ip",),
            },
        ),
        migrations.CreateModel(
            name="VlanName",
            fields=[
                (
                    "vid",
                    models.PositiveIntegerField(
                        primary_key=True,
                        serialize=False,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(4096),
                        ],
                        verbose_name="VLAN id",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True, max_length=100, null=True, verbose_name="Название"
                    ),
                ),
                ("description", models.TextField(verbose_name="Описание")),
            ],
            options={
                "db_table": "vlan_name",
            },
        ),
        migrations.CreateModel(
            name="DevicesForMacSearch",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "description",
                    models.CharField(
                        blank=True, max_length=255, null=True, verbose_name="Описание"
                    ),
                ),
                (
                    "device",
                    models.ForeignKey(
                        help_text="Будет искать MAC в таблице arp оборудования",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="check.devices",
                        verbose_name="Оборудование для поиска MAC",
                    ),
                ),
            ],
        ),
    ]
